package com.imut.lagain.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.time.LocalDateTime;

/**
 * 链接密码存储表
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("final_password")
public class FinalPassword {
    private static final Logger log = LoggerFactory.getLogger(FinalPassword.class);

    
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 密码值（加密存储）
     */
    @NotBlank(message = "密码不能为空")
    @Size(max = 255, message = "密码长度不能超过255个字符")
    @TableField("password")
    private String password;
    
    /**
     * 密码描述
     */
    @Size(max = 500, message = "密码描述长度不能超过500个字符")
    @TableField("description")
    private String description;
    
    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    
    /**
     * 是否激活 1-激活 0-未激活
     */
    @TableField("is_active")
    private Boolean isActive = true;
    
    /**
     * 是否删除(1-已删除 0-未删除
     */
    @TableLogic
    @TableField("is_deleted")
    private Boolean isDeleted = false;
    public String getPassword() {
        return password;
    }
    
    public void setPassword(String password) {
        this.password = password;
    }
    
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }
    
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }
    
    public void setDescription(String description) {
        this.description = description;
    }
    
    public String getDescription() {
        return description;
    }
    
    public void setIsActive(Boolean isActive) {
        this.isActive = isActive;
    }
    
    public Boolean getIsActive() {
        return isActive;
    }
    
    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
    
    public LocalDateTime getCreateTime() {
        return createTime;
    }
}
